package com.example.practical_training_projects.service;


import com.example.practical_training_projects.entity.test3;
import com.example.practical_training_projects.entity.user;

import com.example.practical_training_projects.mapper.test3Mapper;
import com.example.practical_training_projects.mapper.test3Mapper;
import com.example.practical_training_projects.vo.votest2class;
import com.example.practical_training_projects.vo.votest3class;
import com.example.practical_training_projects.vo.votest3class;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class test3Servicelmpl implements test3Service{
    @Autowired
    private test3Mapper mapper;
    @Override
    public List<test3> getAlltest3() {
        return mapper.getAlltest3();
    }

    @Override
    public Integer deleteTest3(Integer t3_uid) {
        return mapper.deleteTest3(t3_uid);
    }

    @Override
    public Integer insertTest3(test3 t3_uid) {
        return mapper.insertTest3(t3_uid);

    }

    @Override
    public test3 findTest3uid(Integer t3_uid) {
        return mapper.findTest3uid(t3_uid);
    }

    @Override
    public Integer updateTest3(test3 test3) {
        return mapper.updateTest3(test3);
    }

    @Override
    public List<test3> getContest3(String t3_context) {
        return mapper.getContest3(t3_context);
    }

    @Override
    public List<votest3class> findAlltest3Andclass() {
        return mapper.findAlltest3Andclass();
    }

    @Override
    public List<votest3class> findtest3Bycontext(String t3_context) {
        return mapper.findtest3Bycontext(t3_context);
    }

    @Override
    public List<votest3class> findtest3BycontextAndclassuid(Integer ts_uid, String t3_context) {
        return mapper.findtest3BycontextAndclassuid(ts_uid,t3_context);
    }

    @Override
    public PageInfo<votest3class> findtestpage(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<votest3class> lists=mapper.findAlltest3Andclass();
        PageInfo<votest3class> pageInfo=new PageInfo<>(lists);
        return pageInfo;
    }
}
